<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let n1 = Math.pow(2,53);
        let n2 = Math.pow(2,53);
 
        console.log(n1);//9007199254740992
        // console.log(n2);//9007199254740992


        let n3 = Math.pow(2,1023);

        console.log(n3); //Infinity
        console.log(BigInt(n3));  //89884656743115795386465259539451236680898848947115…293149119973622969239858152417678164812112068608n


        let bN1 = BigInt(n1);

        // 跨类型 无法计算
        let bN2 = BigInt(n2) + BigInt(n2);

        console.log(typeof bN1); //bigint

        console.log(bN1);
        console.log(bN2);

        // bigInt数据类型 变成普通数字
        let bN3 = BigInt(123);
        let n5 = 123;

        console.log(bN3 == n5); //true
        console.log(bN3 === n5); //false

        console.log(bN3);

        let n4 = Number(bN3) + 456;

        console.log(n4);

    </script>
</body>
</html>